<?php
/**
 * Maker: 梁康宁
 * Time: 2019-09-17 14:51:14
*/
namespace app\common\model;
use think\Model;
use think\Db;
class ApiType extends Model
{


    //api传入参数 img_url
    static function uploadPic($site_url){
        $data = Db::name('api_type')->where(['key'=>'uploadPic'])->find();
        $site_url = substr($site_url,-1)=='/'?$site_url:$site_url.'/';
        $data['url'] = $site_url.$data['url'];//根据域名拼接完整的url
        return $data;
    }
}
?>